package com.wn.cloud.consumer.api;

import com.wn.cloud.common.response.DataResult;
import com.wn.cloud.consumer.fallback.PaymentFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @FileName: PaymentHystrixClient
 * @Description: TODO
 * @Author: MaWenHao
 * @Created: 2020/3/15 - 23:54
 * @Version: V1.0
 * @Company: 东方微银科技（北京）有限公司
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-HYSTRIX-SERVICE", fallback = PaymentFallback.class)
public interface PaymentHystrixClient {

    @GetMapping("/payment/hystrix/{id}")
    DataResult<String> getOne(@PathVariable("id") long id);

    @GetMapping("/payment/hystrix/timeout")
    DataResult<String> getTimeout();
}
